<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="<%=basePath %>common/js/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="<%=basePath %>common/extjs/ext-base-debug.js" type="text/javascript"></script>
<script src="<%=basePath %>common/extjs/ext-all-debug.js" type="text/javascript"></script>
<script src="<%=basePath %>common/extjs/ext-lang-zh_CN.js" type="text/javascript"></script>
<link href="<%=basePath %>common/extjs/resources/css/ext-all.css" type="text/css" rel="stylesheet"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${si.loginPageTitle }</title>
<style type="text/css">
<!--
body {
	margin: 0px;
	padding: 0px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	background-image: url(/common/images/loginimgs/new/bodybg.gif);
	background-repeat: repeat;
}
#container {
	height: 613px;
	width: auto;
}
#container .topimg {
	height: 320px;
	width: 100%;
	position: absolute;
	margin: 0px;
	padding: 0px;
	float: right;
	clear: both;
	}
#container  .topleft {
	height: 318px;
	width: 648px;
	background-image: url(/common/images/loginimgs/new/topleft.jpg);
	background-repeat: no-repeat;
	position: absolute;
	margin-top: 0px;
	margin-left: 0px;
	float: left;
}
#container  .topright {
	height: 318px;
	width: 291px;
	background-image: url(/common/images/loginimgs/new/topright.jpg);
	background-repeat: no-repeat;
	position: relative;
	margin-top: 0px;
	margin-right: 0px;
	float: right;
}
#container .loginbox {
	height: 573px;
	width: 486px;
	background-image: url(/common/images/loginimgs/new/loginbox.gif);
	background-repeat: no-repeat;
	position: relative;
	margin-right: auto;
	margin-left: auto;
	margin-top: 0px;
	margin-bottom: 0px;
    padding: 0px;
}

#container .loginbox .logincontent {
	height: 150px;
	width: 210px;
	margin-left: 225px;
	padding-top: 60px;
	
}
#container .loginbox div table tr td a img {
	border-top-style: none;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
}
#container .loginbox .nullbox {
	height: 200px;
}
-->
</style>
</head>

<body>
<form id="loginForm" action="<%=basePath%>app/sys/user/user!login" method="post">
<div id="container">
    <div class="topleft"></div>
    <div class="topright"></div>
<div class="loginbox" id="loginbox">
        <div class="nullbox"></div>
  		<div class="logincontent">
          <table  border="0">
            <tr>
              <td width="64" height="32" align="center">用户名：</td>
              <td width="136"><label>
                <input name="entity.loginName" type="text" id="username" size="15" style="width:120px" height="18" onkeypress="keypress('name')"/>
              </label></td>
            </tr>
            <tr>
              <td height="32" align="center">密&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
              <td><input name="entity.password" type="password" id="password" size="15" height="18" style="width:120px" onkeypress="keypress('pwd')"/></td>
            </tr>
            <tr>
              <td  height="40" colspan="2" align="center"><a href="#"><img onclick="submit()" src="/common/images/loginimgs/new/login1-bt.gif" width="50" height="25" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#"><img onclick="rst();" src="/common/images/loginimgs/new/login2-bt.gif" width="50" height="25" /></a></td>
            </tr>
          </table>
    </div>
  
  </div>
</div>
</form>
<script type="text/javascript">
$("#loginbox").css("margin-left",(screen.width-486)/2);
</script>
<script type="text/javascript">
	$(function(){
		$("#username").val("").focus();
		var msg = "${errMsg}";
		if(msg!=""){
			Ext.MessageBox.show({
		           title: '错误',
		           msg: msg,
		           buttons: Ext.MessageBox.OK,
		           icon: Ext.MessageBox.WARNING,
		           fn:rst
		       });
		}
		
	});

	function rst(){
 		$("#username").val("").focus();
 		$("#password").val("");
 	}

 	function sbt(){
 		$("#loginForm").submit();
 	}

 	function keypress(v){
 		if(event.keyCode==13){
 			if(v=="name"){
 				$("#password").focus();
 	 	 	}else if(v=="pwd"){
				//login();
				$("#loginForm").submit();
 	 	 	}
 		}
 	}
</script>
</body>
</html>
